<template>
  <div class="boa">
    <!-- 商机区域 -->
    <Head title="商 机" id="backstyle"> </Head>
    <Banner :id="BannerId" class="bannerId"></Banner>
    <!-- 版心区域 -->
    <!-- 商机总区域 -->
    <div class="tp title-center">
      <!-- 商机区域 -->
      <!-- 用户单位文字区域 -->
      <div class="umit bold-size">
        <div class="xiao tac">
          <div class="left"></div>
          <div class="zhong l-h">
            {{ this.$route.query.title }}
          </div>
        </div>
      </div>
    </div>
    <!-- 内容区域 -->
    <div
      class="context area-center richText bold-size m-t-07"
      v-if="list && list.length"
      v-html="list"
    ></div>
    <div v-else class="text-cenetr p-20 bold-siz">暂无数据</div>
  </div>
</template>
  
  <script>
import { getContent } from "@/api/index";
import Head from "@/components/public/HeadPage.vue";
import Banner from "@/components/Home/BannerView.vue";
export default {
  data() {
    return {
      list: [],
    };
  },
  components: {
    Head,
    Banner,
  },
  mounted() {
    getContent({
      id: this.$route.query.id,
    }).then((res) => {
      if (res.data.code == 200) {
        this.list = this.dataHTML(res.data.msg);
      }
    });
  },
  methods: {
    legal(title) {
      // console.log("title",title);
    },
  },
  computed: {
    BannerId() {
      switch (this.$route.query.typeId) {
        // 名茶
        case "f7a84efa-274a-49de-8bf4-b30fd66cfd61":
          return "7";
        // 名酒
        case "57f93baf-975d-414b-a170-ac66c2a22277":
          return "10";

        default:
          break;
      }
    },
  },
};
</script>
  
  <style scoped>
.boa {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* 图标区域 */
.top img {
  width: 0.24rem;
  margin-right: 0.05rem;
}
/* 商机总区域 */
.tp {
  width: 100%;
 
}
h3 {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  font-size: 0.24rem;
  border-bottom: 2px solid #dad9df;
}
h3 img {
  width: 0.28rem;
  margin-right: 0.05rem;
}
/* 用人单位区域 */
.umit {
  width: 100%;
}
.xiao {
  width: 100%;

  display: flex;
  align-items: center;
}
/* 左边区域 */

.xiao .left img {
  width: 0.1rem;
  height: 0.3rem;
}
/* 中间区域 */
.zhong {
  width: 100%;
  height: 100%;
}
/* 内容区域 */
.context {
  word-break: break-all;
}
.context .text {
  width: 100%;
  margin-top: 0.05rem;
  display: flex;
}
/* 左边区域 */
.context .num {
  width: 5%;
  height: 0.3rem;
  padding-top: 0.03rem;
  font-weight: 700;
}
.num img {
  width: 0.2rem;
  height: 0.2rem;
}
/* 中间区域 */
.context .tex {
  width: 95%;
  height: 100%;
  line-height: 0.3rem;
  padding-left: 5px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
</style>